# 计算满足条件的最大整数n，使得1+2+3+…+n<=10000
n = 1
sum = 0
while(True):
    sum += n;
    if sum > 10000:
        break
    n+=1

print("最大整数n为", n - 1, "使得1+2+3+…+n<=10000")